Page({
  data: {
    status: [false, false, false]
  },
  //点击灯泡
  myClick(e) {
    // console.log(e)
    var index = e.currentTarget.id; //点击的第几个灯泡
    this.data.status[index] = !this.data.status[index]

    //渲染到页面
    this.setData({
      status:this.data.status
    })


  },
  //跳转详情页
  navigateDetail(){
    wx.navigateTo({
      url: '/pages/detail/detail?id=1001',
      success:res=>{
        console.log(res)
      },
      fail:err=>{
        console.log(err)
      }
    })
  }
})